package com.misty.dao.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.misty.dao.domain.Users;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName(value = "message")//回复
public class MessageDto {

    @TableId(type = IdType.AUTO)
    private Integer id; //id

    private String content; //评论内容

    private LocalDateTime createTime = LocalDateTime.now(); //创建时间

    @TableField(value = "comment_id")
    private Integer commentId;

    @TableField(value = "user_id")
    private Integer userId;

    @TableField(value = "to_user_id")
    private Integer toUserId;

    @TableField(exist = false)
    private Users user;

    @TableField(exist = false)
    private Users toUser;
}
